import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible'
import '@/styles/index.scss'
import request from '@/utils/request'
import eventbus from './eventbus/eventBus'
import { getRelativeTime, getFormatTime } from '@/utils/fromatTime'
import '@/utils/vantpackge'

Vue.filter('relative', function(value) {
  return getRelativeTime(value)
})
Vue.filter('format', function(value) {
  return getFormatTime(value)
})
Vue.directive('focus', {
  inserted(el) {
    el.focus()
  }
})
Vue.prototype.$eventbus = eventbus
Vue.prototype.$request = request
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
